/*
package com.example.demo.socket;

import com.example.demo.SpringContextUtil;
import com.example.demo.po.WiselyResponse;
import com.example.demo.service.WebSocketService;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;
import java.util.TimerTask;

*/
/**
 * 功能描述:
 * 版本信息:   Copyright (c)2018
 * 公司信息:   杭州佐通科技有限公司
 * 开发人员:   xiaohuang
 * 联系:   331088675@qq.com
 * 创建日期:   2018/9/12 14:45
 * 时间         开发者      版本号    修改内容
 * ------------------------------------------------------------------
 * 2018/9/12    xiaohuang      1.0         1.0 Version
 *//*

public class MyQuery extends TimerTask {

    @Override
    public  void run(){
        System.out.println("====================开启线程");
        //ApplicationContext applicationContext = SpringContextUtil.getApplicationContext();
        //System.out.println("dayin"+applicationContext);
        //WebSocketService webSocketService = (WebSocketService)applicationContext.getBean("webSocketService");
        WebSocketService webSocketService = new WebSocketService();
        System.out.println("--------------"+webSocketService);
        List<String> userid=new ArrayList<>();
        String uid="d892bf12bf7d11e793b69c5c8e6f60fb";
        userid.add("d892bf12bf7d11e793b69c5c8e6f60fb");
        //userid.add("d892bf12bf7d11e793b69c5c8e6f60fc");//此处写死只是为了方便测试,此值需要对应页面中订阅个人消息的userId
        WiselyResponse msg=new WiselyResponse("");
        int i=0;
        while(i<=50){
            msg.setResponseMessage("返回值为"+i);
            i=i+5;
            webSocketService.send2Users(userid, msg);
        }
    }
}
*/
